ci: serialize deploys to prevent gh-pages race#113
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When PR #112 merged, the
Zoladeploy job succeeded and pushed togh-pages, but the subsequentpages build and deployment(GitHub Pages' own publish step) hung for 7+ minutes (normal is ~45s), so the new content never went live. Cancelling the stuck run and re-dispatching the deploy fixed it — but the underlying workflow had no protection against this.Cause
deploy.ymlhas noconcurrencycontrol. The deploy usesshalzz/zola-deploy-action, which force-pushes togh-pages. If two runs ever overlap (fast successive merges, a manual re-run racing the push-triggered run, etc.), they stomp ongh-pagesand can leave the Pages deployment wedged.Fix
Add a workflow-level
concurrencygroup so deploys serialize instead of racing:cancel-in-progress: falsequeues runs rather than cancelling, so a deploy that's mid-push togh-pagesis never interrupted.Recommended follow-up (settings, not code)
Make the Zola check a required status check on
master(branch protection) so a PR can't be merged before its build finishes — which is what prompted this investigation.